using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using Zwms.Data.Base;
using System.Runtime.Serialization;

namespace Zwms.Data.BusinessObjects
{
    [DataContract]
    public partial class SysLoginInf : BusinessBase<string>
    {
        #region Declarations

        private string _userCode = String.Empty;
        private string _sysDate = String.Empty;
        private string _logTime = String.Empty;
        private string _logSgn = String.Empty;
        private string _userName = String.Empty;
        private string _departmentCode = String.Empty;
        private string _departmentName = String.Empty;



        #endregion

        #region Constructors

        public SysLoginInf() { }

        #endregion

        #region Methods

        public override int GetHashCode()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.Append(this.GetType().FullName);
            sb.Append(_userCode);
            sb.Append(_sysDate);
            sb.Append(_logTime);
            sb.Append(_logSgn);
            sb.Append(_userName);
            sb.Append(_departmentCode);
            sb.Append(_departmentName);

            return sb.ToString().GetHashCode();
        }

        #endregion

        #region Properties

        //public override string Id
        //{
        //    get
        //    {
        //        System.Text.StringBuilder uniqueId = new System.Text.StringBuilder();
        //        uniqueId.Append(_userCode.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_sysDate.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_logTime.ToString());
        //        uniqueId.Append("^");
        //        uniqueId.Append(_logSgn.ToString());
        //        return uniqueId.ToString();
        //    }
        //}

        [DataMember]
        public virtual string UserCode
        {
            get { return _userCode.TrimEnd(); }
            set
            {
                _userCode = value;
            }
        }

        [DataMember]
        public virtual string SysDate
        {
            get { return _sysDate.TrimEnd(); }
            set
            {
                _sysDate = value;
            }
        }

        [DataMember]
        public virtual string LogTime
        {
            get { return _logTime.TrimEnd(); }
            set
            {
                _logTime = value;
            }
        }

        [DataMember]
        public virtual string LogSgn
        {
            get { return _logSgn.TrimEnd(); }
            set
            {
                _logSgn = value;
            }
        }

        [DataMember]
        public virtual string UserName
        {
            get { return _userName.TrimEnd(); }
            set
            {
                _userName = value;
            }
        }

        [DataMember]
        public virtual string DepartmentCode
        {
            get { return _departmentCode.TrimEnd(); }
            set
            {
                _departmentCode = value;
            }
        }

        [DataMember]
        public virtual string DepartmentName
        {
            get { return _departmentName.TrimEnd(); }
            set
            {
                _departmentName = value;
            }
        }

        #endregion
	}
}